package day06;

public class PolyAppDemo {
    public static void main(String[] args) {
        Animal dog = getInstance();
        dog.spark();

        Dog d = new Dog("旺财","家狗",100.0d);

        test(d);
    }

    public static Animal getInstance(){
        return new Dog();
    }

    public static void test(Animal animal){
        animal.spark();
    }
}
